[IA64] fix GNTTABOP_replace_and_unmap
authorIsaku Yamahata <yamahata@valinux.co.jp>
Fri, 25 Apr 2008 11:13:52 +0000 (20:13 +0900)
committerIsaku Yamahata <yamahata@valinux.co.jp>
Fri, 25 Apr 2008 11:13:52 +0000 (20:13 +0900)
commit5a582275e816653420f61cfb956fb2d03e6edf40
tree85aea5c9c3504e62d85779b4d32e66ad4c97dc4b
parentfff473554132e63dfcc2508021da53038f5a6df0
[IA64] fix GNTTABOP_replace_and_unmap

This patch fixes the following xen panic repored by Akio Takebe.
> When we tested network between domU <-> dom0 with FTP load tools,
> we hitted BUG() in hypervisor. It is always reproducible for a few minutes.
> At that time, we got the following message.
> vmi15.sky.yk.fujitsu.co.jp login: (XEN) Xen BUG at mm.c:1254
>
> (XEN) FIXME: implement ia64 dump_execution_state()
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) Xen BUG at mm.c:1254
> (XEN) ****************************************
> (XEN)
> (XEN) Manual reset required ('noreboot' specified)
> (XEN) machine_halt called.  spinning...

GNTTABOP_replace_and_unmap must updates both the p2m table and m2p
table. However the m2p table update was missing so that
the above BUG_ON() was triggered detecting the inconsistency
between the p2m table and the m2p table.
This patch adds the missing the m2p table updates.
This patch also fixes the error path of the function. It may
return before completing the page table manipulation.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
xen/arch/ia64/xen/mm.c